package com.zut.util;


import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;
import org.thingsboard.rest.client.RestClient;

@Component
public class newThingsBoardDevice {

    @Value("${spring.thingsboard.url}")
    String url;

    @Value("${spring.thingsboard.username}")
    String username;

    @Value("${spring.thingsboard.password}")
    String password;

    @Bean
    public RestClient client(){
        RestClient client = new RestClient(url);
        client.login(username, password);
        return client;
    }
}
